package exam;

import java.util.*;

public class Solution1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String str = in.nextLine();
            Queue<Character> queue = new LinkedList<>();
            for (int i = 0; i < str.length(); i++) {
                queue.offer(str.charAt(i));
            }
            char[] ret = new char[100];
            ret[0] = queue.poll();
            int index = 1;
            while(!queue.isEmpty()) {
                if(queue.peek() == ' ') {
                    queue.poll();
                    ret[index] = queue.poll();
                    index++;
                }else {
                    queue.poll();
                }
            }
            char[] ret2 = new char[index+1];
            for (int i = 0; i < index+1; i++) {
                ret2[i] = ret[i];
            }
            String str1 = new String(ret2);
            System.out.println(str1.toUpperCase());
        }
    }
}
